package com.sean.designpatterns.create.reflectfactorymethod;

public class Factory {

    public static <T extends Fruit> T getFruit(String className) throws Exception {
        return (T)Class.forName(className).newInstance();
    }
}
